package com.liebaut.model.order;

import com.liebaut.model.DomainObject;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: User
 * Date: 25/01/14
 * Time: 10:44
 * To change this template use File | Settings | File Templates.
 */
@Entity
public class Invoice implements DomainObject<Long> {

    @Id
    @GeneratedValue
    private Long id;
    @OneToOne
    private Order order;
    private String invoiceNumber;

    @CreatedDate
    private Date dateCreated;


    @Override
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    public String getInvoiceNumber() {
        return invoiceNumber;
    }

    public void setInvoiceNumber(String invoiceNumber) {
        this.invoiceNumber = invoiceNumber;
    }

    public Date getDateCreated() {
        return dateCreated;
    }

    public void setDateCreated(Date dateCreated) {
        this.dateCreated = dateCreated;
    }
}
